import http from '@/utils/http.ts'

// 定义分类数据的接口
export interface CategoryData {
  id: number
  name: string
  picture?: string
  [key: string]: unknown
}

// 定义接口响应的数据结构
export interface CategoryResponse {
  code: number
  msg: string
  result: CategoryData[]
  [key: string]: unknown
}

export function getCategory(): Promise<CategoryResponse> {
  return http({
    url: 'home/category/head',
  })
}
